Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document allowJs in TS config #56

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Document allowJs in TS config #56

merged 2 commits into from
Sep 26, 2024

Conversation

Siegrift
Copy link
Collaborator

@Siegrift Siegrift self-assigned this Sep 25, 2024
Copy link
Collaborator

@dcroote dcroote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine. The alternative would be not adding "allowJs": true and instead changing the structure of .eslintrc.json. For commons this works, but it's a bit messier:

{
  "overrides": [
    {
      "files": ["**/*.js", "**/*.jsx"],
      "parser": "espree",
      "parserOptions": {
        "ecmaVersion": 2020,
        "sourceType": "module"
      }
    },
    {
      "files": ["**/*.ts", "**/*.tsx"],
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "project": ["./tsconfig.json"]
      },
      "extends": ["plugin:@api3/eslint-plugin-commons/universal", "plugin:@api3/eslint-plugin-commons/jest"],
      "rules": {
        "lodash/import-scope": ["error", "method"]
      }
    }
  ]
}

README.md Outdated Show resolved Hide resolved
Co-authored-by: Derek Croote <[email protected]>
@Siegrift Siegrift merged commit 9b32c47 into main Sep 26, 2024
5 checks passed
@Siegrift Siegrift deleted the doc-allow-js branch September 26, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants